package com.vivz.baby.enumeration;

public enum LoginType {
	
	EMAIL(1, "EMAIL"), //
	FACEBOOK(2, "FACEBOOK"), //
	GOOGLE(3, "GOOGLE");
	
	private final int id;
	private final String description;
	
	private LoginType(final int id, final String description) {
		this.id = id;
		this.description = description;
	}
	
	public static final LoginType getInstance(final int id) {
		
		for (final LoginType value : LoginType.values()) {
			if (value.id == id) {
				return value;
			}
		}
		
		return null;
	}
	
	public int getId() {
		return id;
	}
	
	public String getDescription() {
		return description;
	}
}
